package com.chapter10.homework_.homework03_;

/**
 * @author 宋鑫宇
 * @version 1.0
 */
public class HomeWork03 {
    public static void main(String[] args) {
        Cellphone cellphone = new Cellphone();
        //直接传入实现calculator接口的匿名内部类和两个参数
        cellphone.testWork(new calculator() {
            @Override
            public double work(double n1, double n2) {
                return n1 + n2;
            }
        }, 10, 8);

    }
}
